import request from '@/utils/request'

// 查询航季航班计划列表
export function listSeasonflightplan(query) {
  return request({
    url: '/baseinfo/seasonflightplan/list',
    method: 'get',
    params: query
  })
}

/**
 * 获取航班列表（无分页）
 * @param {*} query 
 * @returns 
 */
export function listPlanNoPage(query) {
  return request({
    url: '/baseinfo/seasonflightplan/listNoPage',
    method: 'get',
    params: query
  })
}

// 查询航季航班计划详细
export function getSeasonflightplan(planid) {
  return request({
    url: '/baseinfo/seasonflightplan/' + planid,
    method: 'get'
  })
}

// 新增航季航班计划
export function addSeasonflightplan(data) {
  return request({
    url: '/baseinfo/seasonflightplan',
    method: 'post',
    data: data
  })
}

// 修改航季航班计划
export function updateSeasonflightplan(data) {
  return request({
    url: '/baseinfo/seasonflightplan',
    method: 'put',
    data: data
  })
}

// 删除航季航班计划
export function delSeasonflightplan(planid) {
  return request({
    url: '/baseinfo/seasonflightplan/' + planid,
    method: 'delete'
  })
}

/**
 * 根据航班号获取航班信息
 * @param {*} fltno 
 * @returns 
 */
export function getflightInfoWithNo(fltno) {
  return request({
    url: '/baseinfo/seasonflightplan/selectFLTNO/' + fltno,
    method: 'get'
  })
}

